<html>
<head><meta charset="utf-8"><title>build docs.rs windows docker · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html">build docs.rs windows docker</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216755897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216755897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216755897">(Nov 14 2020 at 23:20)</a>:</h4>
<p>trying to build <a href="http://docs.rs">docs.rs</a> with docker-compose up, but the web container always fail<br>
<code>2020/11/14 23:04:44 [INFO] rustwide::cmd: [stdout] stable-x86_64-unknown-linux-gnu unchanged - rustc 1.47.0 (18bf6b4f0 2020-10-07)
2020/11/14 23:04:44 [INFO] rustwide::cmd: [stdout]
2020/11/14 23:04:44 [INFO] rustwide::cmd: [stderr] info: checking for self-updates
2020/11/14 23:04:44 [INFO] rustwide::tools: tool git-credential-null is missing, installing it
2020/11/14 23:04:44 [INFO] rustwide::cmd: running </code>Command { std: "/opt/docsrs/rustwide/cargo-home/bin/cargo" "+stable" "install" "git-credential-null", kill_on_drop: false }<code>
2020/11/14 23:04:46 [INFO] rustwide::cmd: [stderr] Updating crates.io index
2020/11/14 23:04:47 [INFO] rustwide::cmd: [stderr] warning: spurious network error (2 tries remaining): failed to mmap. Could not write data: Permission denied; class=Os (2)
2020/11/14 23:04:49 [INFO] rustwide::cmd: [stderr] warning: spurious network error (1 tries remaining): failed to mmap. Could not write data: Permission denied; class=Os (2)
2020/11/14 23:04:50 [INFO] rustwide::cmd: [stderr] error: failed to fetch </code>https://github.com/rust-lang/crates.io-index<code>
2020/11/14 23:04:50 [INFO] rustwide::cmd: [stderr]
2020/11/14 23:04:50 [INFO] rustwide::cmd: [stderr] Caused by:
2020/11/14 23:04:50 [INFO] rustwide::cmd: [stderr] failed to mmap. Could not write data: Permission denied; class=Os (2)
Error: command failed: exit code: 101
</code></p>
<p>It looks like i'm unable to access the network to feth <a href="http://crates.io">crates.io</a> for rustwide...</p>



<a name="216755903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216755903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216755903">(Nov 14 2020 at 23:20)</a>:</h4>
<p>I'm on windows OS btw</p>



<a name="216755918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216755918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216755918">(Nov 14 2020 at 23:21)</a>:</h4>
<p>'failed to mmap' is a really weird error</p>



<a name="216755959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216755959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216755959">(Nov 14 2020 at 23:22)</a>:</h4>
<p>the only thing I can think of is the permissions in the container don't work with the permissions outside? like the users don't match up or something?</p>



<a name="216755962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216755962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216755962">(Nov 14 2020 at 23:22)</a>:</h4>
<p>we mount volumes for caching</p>



<a name="216756025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216756025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216756025">(Nov 14 2020 at 23:24)</a>:</h4>
<p>I'll look into it, but i've other docker containers with volumes mounted and never had any problem with permissions.</p>



<a name="216756991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216756991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216756991">(Nov 14 2020 at 23:44)</a>:</h4>
<p>another possibility if you have docker installed is to run the builds outside the docker container</p>



<a name="216756995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216756995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216756995">(Nov 14 2020 at 23:44)</a>:</h4>
<p><code>cargo run database migrate &amp;&amp; cargo run build add-essential-files &amp;&amp; cargo run start-web-server</code></p>



<a name="216757512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216757512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216757512">(Nov 14 2020 at 23:54)</a>:</h4>
<p>well i've started by following the README.md steps in the repo, but got an error<code>in the bellow step
</code></p>
<h1>Build a sample crate to make sure it works</h1>
<h1>This also sets up the <a href="http://docs.rs">docs.rs</a> build environment.</h1>
<h1>This will take a while the first time but will be cached afterwards.</h1>
<p>cargo run -- build crate regex 1.3.1<br>
`<br>
this command started to download from rustops/env-build.... a container that apparently complained about me being on windows..</p>



<a name="216757640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216757640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216757640">(Nov 14 2020 at 23:56)</a>:</h4>
<p>so i've stopped it and just ran <code>docker-compose up</code> as explained in the same readme.md bellow..</p>
<blockquote>
<p>Pure docker-compose</p>
<p>If you have trouble with the above commands, consider using docker-compose up, which uses docker-compose for the web server as well. This will not cache dependencies as well - in particular, you'll have to rebuild all 400 &gt; whenever the lockfile changes - but makes sure that you're in a known environment so you should have fewer problems getting started.</p>
</blockquote>
<p>and that brought me to this mmap issue.. <span aria-label="neutral" class="emoji emoji-1f610" role="img" title="neutral">:neutral:</span></p>



<a name="216757691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216757691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216757691">(Nov 14 2020 at 23:57)</a>:</h4>
<p>but i'll keep trying to get it to work.</p>



<a name="216757703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216757703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216757703">(Nov 14 2020 at 23:57)</a>:</h4>
<p>I'm currently trying to build under wsl2</p>



<a name="216757838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216757838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216757838">(Nov 15 2020 at 00:00)</a>:</h4>
<p>Ah right, yeah builds definitely won't work on Windows</p>



<a name="216757869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216757869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216757869">(Nov 15 2020 at 00:01)</a>:</h4>
<p>I would be surprised if they worked under wsl even, rustwide gets the host and sandboxes toolchains confused</p>



<a name="216757933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216757933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216757933">(Nov 15 2020 at 00:02)</a>:</h4>
<p>What do you want to do with <a href="http://docs.rs">docs.rs</a>? You might be able to get away with just not running builds</p>



<a name="216758502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216758502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216758502">(Nov 15 2020 at 00:15)</a>:</h4>
<p>yes, i really don't need the full builds . I just need to work with the cratesfyi binary to work on <a href="https://github.com/rust-lang/docs.rs/issues/1176">#1176</a></p>



<a name="216758546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216758546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216758546">(Nov 15 2020 at 00:16)</a>:</h4>
<p>i can comment almost everything out there too, just to ran that "cron"</p>



<a name="216758651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216758651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216758651">(Nov 15 2020 at 00:19)</a>:</h4>
<p>eventually i might need postgres if we decide to persist in the db the information that the github repo is not found (also archived?)<br>
 anymore for a specific crate/release while updating github stars stats</p>



<a name="216758653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216758653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216758653">(Nov 15 2020 at 00:19)</a>:</h4>
<p>but that i can build and run, already tested it</p>



<a name="216759074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216759074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216759074">(Nov 15 2020 at 00:30)</a>:</h4>
<p><a href="/user_uploads/4715/eSbSJr1DqD8Efgyf5CqFadGW/image.png">image.png</a> <br>
if i'm not mistaken i think i'm already doing progress.</p>
<div class="message_inline_image"><a href="/user_uploads/4715/eSbSJr1DqD8Efgyf5CqFadGW/image.png" title="image.png"><img src="/user_uploads/4715/eSbSJr1DqD8Efgyf5CqFadGW/image.png"></a></div>



<a name="216759091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216759091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216759091">(Nov 15 2020 at 00:30)</a>:</h4>
<p>i think i never got to the step of installing nightly toolchain</p>



<a name="216759539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216759539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216759539">(Nov 15 2020 at 00:38)</a>:</h4>
<p>its running <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="216759558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216759558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216759558">(Nov 15 2020 at 00:38)</a>:</h4>
<p><a href="/user_uploads/4715/_YWIHz47lDPe-9jCcJzQLXbp/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/_YWIHz47lDPe-9jCcJzQLXbp/image.png" title="image.png"><img src="/user_uploads/4715/_YWIHz47lDPe-9jCcJzQLXbp/image.png"></a></div>



<a name="216759707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216759707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216759707">(Nov 15 2020 at 00:41)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span>  but i have no single crate doc on the website. whats the best way to feed some documentation in the db? is there a command to add some crate to the build queue?</p>



<a name="216759769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216759769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216759769">(Nov 15 2020 at 00:42)</a>:</h4>
<p><span class="user-mention" data-user-id="344082">@Nelson J Morais</span> the command from the readme</p>



<a name="216759776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216759776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216759776">(Nov 15 2020 at 00:42)</a>:</h4>
<p>err not sure how to run it inside the docker container</p>



<a name="216759803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216759803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216759803">(Nov 15 2020 at 00:43)</a>:</h4>
<p>try <code>docker-compose run web build crate regex 1.3.1</code></p>



<a name="216760516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216760516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216760516">(Nov 15 2020 at 00:54)</a>:</h4>
<p>needed to change env var <code>CRATESFYI_PREFIX</code> from <code>ignored/cratesfyi-prefix</code> to <code>/opt/docsrs/prefix</code> and ran <code>cratesfyi build crate regex 1.3.1</code><br>
docs are built and already available <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="216760536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216760536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nelson J Morais <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216760536">(Nov 15 2020 at 00:54)</a>:</h4>
<p>thanks for your help!</p>



<a name="216760575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20docs.rs%20windows%20docker/near/216760575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20docs.2Ers.20windows.20docker.html#216760575">(Nov 15 2020 at 00:55)</a>:</h4>
<p>you're welcome :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>